/*
    学生人员管理
 */
import request from '@/router/axios'

//列表的人员展示和查找
export function studentList(obj) {
    return request({
        url: '/campus/student/page',
        method: 'get',
        params: obj
    })
}

//人员增加
export function addStudent(obj) {
    return request({
        url: '/campus/student',
        method: 'post',
        data: obj
    })
}
//人员编辑
export function editStudent(obj) {
    return request({
        url: '/campus/student',
        method: 'put',
        data: obj
    })
}
//上传人员照片
export function addStudentPhoto(obj) {
    return request({
        url: '/campus/persons/photo',
        method: 'post',
        data: obj
    })
}

//新增弹窗关闭时删除人员图片
export function delStudentPhoto(id) {
    return request({
        url: '/campus/persons/photo/' + id,
        method: 'delete',
    })
}

//根据id查看人员照片
export function showStudentPhoto(id) {
    return request({
        url: '/campus/persons/photo/' + id,
        method: 'get',
        params: id
    })
}

//人员删除
export function delStudent(id) {
    return request({
        url: '/campus/student/' + id,
        method: 'delete',
    })
}

//批量删除
export function delIdsObj(ids) {
    return request({
        url: '/campus/student/deleteBatch/' + ids,
        method: 'delete',

    })
}


//年级班级
export function deptList(obj) {
    return request({
        url: '/campus/sysdept/detpTree/1/2,3',
        method: 'get',
        params: obj
    })
}

//年级
export function gradeList(obj) {
    return request({
        url: '/campus/sysdept/detpTree/1/2',
        method: 'get',
        params: obj
    })
}

//卡编号
export function qrcode(ids) {
    return request({
        url: '/campus/personsqrcode/' + ids,
        method: 'get',
    })
}
//新增卡编号
export function addQrcode(obj) {
    return request({
        url: '/campus/personsqrcode',
        method: 'post',
        data: obj
    })
}
//编辑卡编号
export function editCode(obj) {
    return request({
        url: '/campus/personsqrcode',
        method: 'post',
        data: obj
    })
}

